import random
from datetime import datetime



def gene_userid():
    # 获取当前时间的年月
    current_date = datetime.now()
    year_month = current_date.strftime("%y%m")
    # 生成6位随机数字
    random_number = random.randint(10000000, 99999999)
    # 拼接成用户ID
    user_id = f"{year_month}{random_number}"
    # print(f"user_id:{user_id}")
    return user_id